
module.exports ={
	
	// 查询文章源和标签
	queryArticleSourceAndLabel: 'SELECT' +
		' a.id,a.title,a.create_time,a.author_id,l.label_name,s.source_name,s.source_url' +
	' FROM' +
		' label_article_relation AS  lr,' +
		' article AS a,' +
		' label AS l,' +
		' article_source AS s' +
	' WHERE' +
		' lr.article_id = a.id' +
	' AND' +
		' lr.label_id = l.id' +
	' AND' +
		' a.article_source_id = s.id;',
	
	// 查询文章段落位置
	queryArticleParagraph: 'SELECT' +
		' p.location,p.id' +
	' FROM' +
		' article_paragraph AS p' +
	' WHERE' +
		' p.article_id = ?' +
	' ORDER BY' +
		' p.location',
	
	// 查询段落元素关系位置
	queryArticleElementOrder: 'SELECT' +
		' r.*' +
	' FROM' +
		' paragraph_element_relation AS r' +
	' WHERE' +
		' r.paragraph_id = ?' +
	' ORDER BY' +
		' r.order_number;',
	
	// 查询段落图片元素
	queryArticleImageElement: 'SELECT' +
		' i.image_url' +
	' FROM' +
		' element_images AS i' +
	' WHERE' +
	' i.id = ?;',
	
	// 查询段落视频元素
	queryArticleVideoElement: 'SELECT' +
		' v.video_url' +
	' FROM' +
		' element_video AS v' +
	' WHERE' +
		' v.id = ?;',
	
	// 查询段落文本元素
	queryArticleTextElement: 'SELECT' +
		' t.text_segment' +
	' FROM' +
		' element_text AS t' +
	' WHERE' +
		' t.id = ?;',
	
	// 查询支持者
	queryArticleSupport: 'SELECT' +
		' u.*' +
	' FROM' +
		' article_support AS s,' +
		' user AS u' +
	' WHERE' +
		' s.supporter_id = u.id' +
	' AND' +
		' s.article_id = ?;'
};